package com.vpen.block.task;

import com.vpen.block.model.PlanDTO;
import com.vpen.block.queue.BlockQueuePlanBuff;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.stereotype.Component;

/**
 * @version: 1.0
 * @author: Vpen
 * @date: 2021/11/20 23:53
 * @content:
 */
@Data
@Component
@Accessors(chain = true)
public class ProducerPlan implements Runnable {
    private BlockQueuePlanBuff buff;
    private PlanDTO plan;

    @Override
    public void run() {
        try {
            this.buff.save1(plan);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
